import request from "@/utils/request";

export function getEmployeeFile(params) {
  return request({
    url: `/hr/api/v1/personalEvent/selectByEventTime`,
    method: "get",
    params
  });
}

export function addPersonalEvent(data) {
  return request({
    url: "/hr/api/v1/personalEvent",
    method: "post",
    data
  });
}

export function updatePersonalEvent(data) {
  return request({
    url: "/hr/api/v1/personalEvent",
    method: "put",
    data
  });
}

export function deletePersonalEvent(id) {
  return request({
    url: `/hr/api/v1/personalEvent/${id}`,
    method: "delete"
  });
}
export function uploadGeneralFile(data, url) {
  url = !!url ? url : "/file/api/v1/site/upload/attachment";
  return request({
    url: url,
    method: "post",
    headers: {
      "Content-Type": "multipart/form-data"
    },
    data
  });
}
